import request from '@/plugins/axios'

export function getPayable(id) {
  return request({
    url: '/api/collectionReceivable/' + id,
    method: 'get'
  })
}
export function paymentPage(query) {
  return request({
    url: '/api/lessorpayment/page',
    method: 'get',
    params: query
  })
}

export function fetchList(query) {
  return request({
    url: '/api/financecollectionrefund/page',
    method: 'get',
    params: query
  })
}

export function addObj(obj) {
  return request({
    url: '/api/financecollectionrefund',
    method: 'post',
    data: obj
  })
}

export function getObj(id) {
  return request({
    url: '/api/financecollectionrefund/' + id,
    method: 'get'
  })
}

export function delObj(id) {
  return request({
    url: '/api/financecollectionrefund/' + id,
    method: 'delete'
  })
}

export function putObj(obj) {
  return request({
    url: '/api/financecollectionrefund',
    method: 'put',
    data: obj
  })
}

export function getObjByApproval(str) {
    return request({
        url: '/api/financecollectionrefund/approval',
        method: 'get',
        params: str
    })
}
export function getRefund(id) {
    return request({
        url: '/api/financecollectionrefund/actual/' + id,
        method: 'get'
    })
}

export function getRefundAmountCount(id) {
    return request({
        url: '/api/lessorrefund/getRefundAmountCount/' + id,
        method: 'get'
    })
}

export function addLessorRefund(obj) {
    return request({
        url: '/api/lessorrefund',
        method: 'post',
        data: obj
    })
}

